import Layout from '@/layout/index.vue'
import RouteView from '@/components/Tool/RouteView.vue'
import { t } from '@/hooks/web/usei18n'
const layoutMap = [
	{
		path: 'home',
		name: 'Home',
		component: () => import('@/view/home/index.vue'),
		meta: { title: t('router.home') }
	},
	{
		path: 'sheet',
		name: 'Sheet',
		component: () => import('@/view/sheet/index.vue'),
		meta: { title: t('router.sheet.sheet'), showFatherRouter: true },
		children: [
			{
				path: 'profitSheet',
				name: 'ProfitSheet',
				component: () => import('@/view/sheet/profitSheet/index.vue'),
				meta: { title: t('router.sheet.profitSheet'), showFatherRouter: false },
				hidden: true
			},
			{
				path: 'debtSheet',
				name: 'DebtSheet',
				component: () => import('@/view/sheet/debtSheet/index.vue'),
				meta: { title: t('router.sheet.debtSheet'), showFatherRouter: false },
				hidden: true
			},
			{
				path: 'balanceSheet',
				name: 'BalanceSheet',
				component: () => import('@/view/sheet/balanceSheet/index.vue'),
				meta: { title: t('router.sheet.balanceSheet'), showFatherRouter: false },
				hidden: true
			},
			{
				path: 'detailSheet',
				name: 'DetailSheet',
				component: () => import('@/view/sheet/detailSheet/index.vue'),
				meta: { title: t('router.sheet.detailSheet'), showFatherRouter: false },
				hidden: true
			},
			{
				path: 'accountantSheet',
				name: 'AccountantSheet',
				component: () => import('@/view/sheet/accountantSheet/index.vue'),
				meta: { title: t('router.sheet.accountantSheet'), showFatherRouter: false },
				hidden: true
			},
			{
				path: 'salarySheet',
				name: 'SalarySheet',
				component: () => import('@/view/sheet/salarySheet/index.vue'),
				meta: { title: t('router.sheet.salarySheet'), showFatherRouter: false },
				hidden: true
			}
		]
	},
	{
		path: 'profit',
		name: 'Profit',
		component: () => import('@/view/profit/index.vue'),
		meta: { title: t('router.profit') },
		hidden: true
	},
	{
		path: 'debt',
		name: 'Debt',
		component: () => import('@/view/debt/index.vue'),
		meta: { title: t('router.debt') },
		hidden: true
	},
	{
		path: 'balance',
		name: 'Balance',
		component: () => import('@/view/balance/index.vue'),
		meta: { title: t('router.balance') },
		hidden: true
	},
	{
		path: 'detail',
		name: 'Detail',
		component: () => import('@/view/detail/index.vue'),
		meta: { title: t('router.detail') },
		hidden: true
	},
	{
		path: 'accountant',
		name: 'Accountant',
		component: () => import('@/view/accountant/index.vue'),
		meta: { title: t('router.accountant') },
		hidden: true
	},
	{
		path: 'salary',
		name: 'Salary',
		component: () => import('@/view/salary/index.vue'),
		meta: { title: t('router.salary') },
		hidden: true
	}
	// 表

	// {
	// 	path: 'system-manage',
	// 	name: 'SystemManage',
	// 	component: RouteView,
	// 	meta: { title: t('router.SystemManage.SystemManage'), icon: 'Setting' },
	// 	redirect: { name: 'UserManage' },
	// 	children: [
	// 		{
	// 			path: 'user-manage',
	// 			name: 'UserManage',
	// 			meta: { title: t('router.SystemManage.UserManage'), icon: 'User' },
	// 			component: () => import('@/view/system-manage/user-manage/index.vue'),
	// 		},
	// 		// {
	// 		// 	path: 'role-manage',
	// 		// 	name: 'RoleManage',
	// 		// 	meta: { title: t('router.SystemManage.RoleManage'), icon: 'Stamp' },
	// 		// 	component: () => import('@/view/system-manage/role-manage/index.vue'),
	// 		// },
	// 		// {
	// 		// 	path: 'menu-manage',
	// 		// 	name: 'MenuManage',
	// 		// 	meta: { title: t('router.SystemManage.MenuManage'), icon: 'Menu' },
	// 		// 	component: () => import('@/view/system-manage/menu-manage/index.vue'),
	// 		// },
	// 		// {
	// 		// 	path: 'log-operation',
	// 		// 	name: 'LogOperation',
	// 		// 	meta: { title: t('router.SystemManage.LogOperation'), icon: 'Document' },
	// 		// 	component: () => import('@/view/system-manage/log-operation/index.vue'),
	// 		// },
	// 	],
	// },
]

const routes = [
	{
		path: '/',
		name: 'Layout',
		meta: { title: t('router.home') },
		redirect: { name: 'Home' },
		component: Layout,
		children: [...layoutMap]
	},
	{
		path: '/login/:type?',
		name: 'Login',
		meta: { title: t('router.login') },
		component: () => import('@/view/login/Login.vue')
	}
]

export { routes, layoutMap }
